paths with obstacles and rivers with rocks